<script setup>
import obj from '@/components/a.js';
import { useRouter } from 'vue-router';

const router = useRouter();

obj.a = '999';
router.replace({ query: { a: '777' } });
</script>

<template>
  <div>
    <div class="left">
      <div class="menu">
        <div class="menu-item">
          <RouterLink to="/component/overview">Overview 组件总览</RouterLink>
        </div>
        <div class="menu-item">
          <RouterLink to="/component/button">Button 按钮</RouterLink>
        </div>
        <div class="menu-item">
          <RouterLink to="/component/tab">Tab 按钮</RouterLink>
        </div>
      </div>
    </div>

    <div class="right">
      <RouterView />
    </div>
  </div>
</template>

<style scoped>
.left {
  width: 200px;
  position: fixed;
  left: 0;
  top: 30px;

  .menu {
    padding-top: 10px;

    .menu-item {
      padding: 10px 20px;
    }
  }
}

.right {
  padding: 10px 0 20px 200px;
}
</style>
